The present invention, in some embodiments thereof, relates to updating tree structures constituting a persistent memory file system and, more specifically, but not exclusively, updating tree structures constituting a persistent memory file system through an atomic operation.
Data storage is one of the major building blocks of the modern technology as everything is about data. One of the challenges every data storage system, product and/or platform is facing is the need to provide a robust crash immune data management environment while maintaining high access rates and data store/retrieval performance. Crash immunity is essential to verify the consistency of a data storage system to assure data integrity and/or avoid data loss in the event of an improper shutdown of the data storage system, for example, a system crash, a system hang and/or a power loss that may occur during one or more operations to the data storage system.
The improper shutdown events when the file system is improperly unmounted may lead to intermittent states within the file system resulting from file operation that were not fully completed and committed to the file system prior to the improper shutdown. To overcome such scenarios multiple techniques are used for implementing a robust file system, for example, physical media scan and fix following the improper unmount (disk check), journaling and/or the likes.
Most file systems are arranged in tree like structures, for example, binary Trees, B−Trees, B+Trees, B*Trees and/or the like allowing fast file search, sort and/or access operations. The tree structures must be properly maintained at all times and conditions to verify their consistency in order to avoid data loss in the file system.
The robust file systems employ different techniques, for example, disk check and/or journaling for tracking the tree structures arrangement and/or file changes in order to make sure intermittent states in each of the tree structures are detected and managed to verify their deterministic state at all times and thus the deterministic state of the entire file system.